package org.struts.action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.struts.from.ActionFrom;
import org.struts.from.loginFrom;

public class loginAction implements Action{

	public String execute(HttpServletRequest request, ActionFrom from,
			Map<String, String> map) {
		loginFrom logfrom=(loginFrom)from;
		if (logfrom.getUsername().equals("admin") && logfrom.getPassword().equals("123456")){
			return map.get("chenggong");
		}else{
			return map.get("shibai");
		}
	}

}
